package lab02.test17;

public class tset {
    public static void main(String[] args) {
        int[] numbers = new int[10];
        numbers[0] = 13;
        numbers[1] = 9;
        numbers[2] = 56;
        numbers[3] = 34;
        numbers[4] = 26;
        //打印
        int index;
        for (index = 0; index < 5; index++) {
            System.out.println(numbers[index]);
        }
        //最大值 最小值
        int max = 0;
        for (int i = 0; i < numbers.length; i++) {
            if (numbers[i] > max) {
                max = numbers[i];
            }
        }
        System.out.println("max is:" + max);

        //求和
        int sum = 0;
        for (int i = 0; i < numbers.length; i++) {
            sum += numbers[i];
            System.out.println("sum is:"+sum);
        }
    }
}
